import http from "../http";


function getBaseInfo(params: any = {}) {
    return http.myRequest({
        url: '/product/getBaseInfo',
        method: 'post',
        data: params,
    })
}


function preAdd(params: any = {}) {
    return http.myRequest({
        url: '/product/preAdd',
        method: 'post',
        data: params,
        header: {
            'Content-Type': 'application/x-www-form-urlencoded'
        }
    })
}

function add(params: any = {}) {
    return http.myRequest({
        url: '/product/add',
        method: 'post',
        data: params,
    })
}

function update(params: any = {}) {
    return http.myRequest({
        url: '/product/update',
        method: 'post',
        data: params,
    })
}

function remove(params: any = {}) {
    return http.myRequest({
        url: '/product/remove',
        method: 'post',
        data: params,
        header: {
            'Content-Type': 'application/x-www-form-urlencoded'
        }
    })
}

function queryByBarcode(params: any = {}) {
    return http.myRequest({
        url: '/product/queryByBarcode',
        method: 'post',
        data: params,
        header: {
            'Content-Type': 'application/x-www-form-urlencoded'
        }
    })
}

function queryList(params: any = {}) {
    return http.myRequest({
        url: '/product/queryList',
        method: 'post',
        data: params,
    })
}

function queryByIds(params: any = {}) {
    return http.myRequest({
        url: '/product/queryByIds',
        method: 'post',
        data: params,
        header: {
            'Content-Type': 'application/x-www-form-urlencoded'
        }
    })
}

export default {
    getBaseInfo,
    preAdd,
    add,
    update,
    remove,
    queryByBarcode,
    queryList,
    queryByIds,

}

